package com.asifrc.tw101;

/**
 * Created by asifrc on 2/11/14.
 */
public class Exercise {
    public static void main(String[] args) {
        Exercise exercise = new Exercise();
        System.out.println("TRIANGLE EXERCISES\n");

        System.out.println("Easiest Exercise Ever");
        exercise.printOne();

        System.out.println("Draw a horizontal line");
        exercise.printHorizontalLine(8);

        System.out.println("Draw a vertical line");
        exercise.printVerticalLine(3);

        System.out.println("Draw a right triangle");
        exercise.drawRight(3);

        System.out.println("DIAMOND EXERCISES\n");

        System.out.println("Isosceles Triangle");
        exercise.drawIsosceles(3);

        System.out.println("Diamond");
        exercise.drawDiamond(3);

        System.out.println("Diamond with Name");
        exercise.drawDiamondWithName(3,"Asif");
    }

    public void printOne() {
        Line line = new Line(1);
        System.out.println(line);
    }
    public void printHorizontalLine(int n) {
        Line line = new Line(n);
        System.out.println(line);
    }

    public void printVerticalLine(int n) {
        VerticalLine line = new VerticalLine(n);
        System.out.println(line);
    }

    public void drawRight(int n) {
        RightTriangle rightTriangle = new RightTriangle(n);
        System.out.println(rightTriangle);
    }

    public void drawIsosceles(int n) {
        IsoscelesTriangle iso = new IsoscelesTriangle(n);
        System.out.println(iso);
    }

    public void drawDiamond(int n) {
        Diamond diamond = new Diamond(n);
        System.out.println(diamond);
    }

    public void drawDiamondWithName(int n, String name) {
        Diamond diamond = new Diamond(n,name);
        System.out.println(diamond);
    }
}
